home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / CMICCProfile.p < prev    next >
Encoding:
Text File  |  1997-08-12  |  25.6 KB  |  768 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        CMICCProfile.p
  3.  
  4.      Contains:    Definitions for ColorSync 2.0 profile
  5.  
  6.      Version:    Technology:    ColorSync 2.1
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1994-1997 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT CMICCProfile;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __CMICCPROFILE__}
  28. {$SETC __CMICCPROFILE__ := 1}
  29.  
  30. {$I+}
  31. {$SETC CMICCProfileIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37.  
  38.  
  39. {$PUSH}
  40. {$ALIGN MAC68K}
  41. {$LibExport+}
  42.  
  43. { Current CMProfile.header.profileVersion Major: 2, Minor: 0, Stage: Developement (x20), Prerelease:0x01 }
  44.  
  45. CONST
  46.     cmCS2ProfileVersion            = $02000000;
  47.  
  48. { Current Major version number }
  49.     cmCurrentProfileMajorVersion = $02000000;
  50.  
  51. { magic cookie number for anonymous file ID }
  52.     cmMagicNumber                = 'acsp';
  53.  
  54. { ColorSync profile version 1.0 }
  55.     cmCS1ProfileVersion            = $00000100;
  56.  
  57.  
  58. {**********************************************************************}
  59. {************** ColorSync 2.0 profile specification *******************}
  60. {**********************************************************************}
  61. {*** flags field  ***}
  62.     cmICCReservedFlagsMask        = $0000FFFF;                    {  these bits of the flags field are defined and reserved by ICC  }
  63.     cmEmbeddedMask                = $00000001;                    {  if bit 0 is 0 then not embedded profile, if 1 then embedded profile  }
  64.     cmEmbeddedUseMask            = $00000002;                    {  if bit 1 is 0 then ok to use anywhere, if 1 then ok to use as embedded profile only  }
  65.     cmCMSReservedFlagsMask        = $FFFF0000;                    {  these bits of the flags field are defined and reserved by CMS vendor  }
  66.     cmQualityMask                = $00030000;                    {  if bits 16-17 is 0 then normal, if 1 then draft, if 2 then best  }
  67.     cmInterpolationMask            = $00040000;                    {  if bit 18 is 0 then interpolation, if 1 then lookup only  }
  68.     cmGamutCheckingMask            = $00080000;                    {  if bit 19 is 0 then create gamut checking info, if 1 then no gamut checking info  }
  69.  
  70. { copyright-protection flag options }
  71.     cmEmbeddedProfile            = 0;                            {  0 is not embedded profile, 1 is embedded profile  }
  72.     cmEmbeddedUse                = 1;                            {  0 is to use anywhere, 1 is to use as embedded profile only  }
  73.  
  74. { speed and quality flag options }
  75.     cmNormalMode                = 0;                            {  it uses the least significent two bits in the high word of flag  }
  76.     cmDraftMode                    = 1;                            {  it should be evaulated like this: right shift 16 bits first, mask off the  }
  77.     cmBestMode                    = 2;                            {  high 14 bits, and then compare with the enum to determine the option value  }
  78.  
  79.  
  80. {*** deviceAttributes fields ***}
  81.     cmICCReservedAttr0Mask        = $0000FFFF;                    {  these bits of the deviceAttributes[0] field are defined and reserved by ICC  }
  82.     cmReflectiveTransparentMask    = $00000001;                    {  if bit 0 is 0 then reflective media, if 1 then transparency media  }
  83.     cmGlossyMatteMask            = $00000002;                    {  if bit 1 is 0 then glossy, if 1 then matte  }
  84.     cmVendorReservedAttr0Mask    = $FFFF0000;                    {  these bits of the deviceAttributes[0] field are defined and reserved by device vendor  }
  85.     cmVendorReservedAttr1Mask    = $FFFFFFFF;                    {  these bits of the deviceAttributes[1] field are defined and reserved by device vendor  }
  86.  
  87. { device/media attributes element values  }
  88.     cmReflective                = 0;                            {  if bit 0 is 0 then reflective media, if 1 then transparency media  }
  89.     cmGlossy                    = 1;                            {  if bit 1 is 0 then glossy, if 1 then matte  }
  90.  
  91.  
  92. {*** renderingIntent field ***}
  93.     cmPerceptual                = 0;                            {  Photographic images  }
  94.     cmRelativeColorimetric        = 1;                            {  Logo Colors  }
  95.     cmSaturation                = 2;                            {  Business graphics  }
  96.     cmAbsoluteColorimetric        = 3;                            {  Logo Colors  }
  97.  
  98.  
  99.  
  100. { data type element values }
  101.     cmAsciiData                    = 0;
  102.     cmBinaryData                = 1;
  103.  
  104. { screen encodings  }
  105.     cmPrtrDefaultScreens        = 0;                            {  Use printer default screens.  0 is false, 1 is ture  }
  106.     cmLinesPer                    = 1;                            {  0 is LinesPerCm, 1 is LinesPerInch  }
  107.  
  108. { 2.0 tag type information }
  109.     cmNumHeaderElements            = 10;
  110.  
  111. { public tags }
  112.     cmAToB0Tag                    = 'A2B0';
  113.     cmAToB1Tag                    = 'A2B1';
  114.     cmAToB2Tag                    = 'A2B2';
  115.     cmBlueColorantTag            = 'bXYZ';
  116.     cmBlueTRCTag                = 'bTRC';
  117.     cmBToA0Tag                    = 'B2A0';
  118.     cmBToA1Tag                    = 'B2A1';
  119.     cmBToA2Tag                    = 'B2A2';
  120.     cmCalibrationDateTimeTag    = 'calt';
  121.     cmCharTargetTag                = 'targ';
  122.     cmCopyrightTag                = 'cprt';
  123.     cmDeviceMfgDescTag            = 'dmnd';
  124.     cmDeviceModelDescTag        = 'dmdd';
  125.     cmGamutTag                    = 'gamt';
  126.     cmGrayTRCTag                = 'kTRC';
  127.     cmGreenColorantTag            = 'gXYZ';
  128.     cmGreenTRCTag                = 'gTRC';
  129.     cmLuminanceTag                = 'lumi';
  130.     cmMeasurementTag            = 'meas';
  131.     cmMediaBlackPointTag        = 'bkpt';
  132.     cmMediaWhitePointTag        = 'wtpt';
  133.     cmNamedColorTag                = 'ncol';
  134.     cmNamedColor2Tag            = 'ncl2';
  135.     cmPreview0Tag                = 'pre0';
  136.     cmPreview1Tag                = 'pre1';
  137.     cmPreview2Tag                = 'pre2';
  138.     cmProfileDescriptionTag        = 'desc';
  139.     cmProfileSequenceDescTag    = 'pseq';
  140.     cmPS2CRD0Tag                = 'psd0';
  141.     cmPS2CRD1Tag                = 'psd1';
  142.     cmPS2CRD2Tag                = 'psd2';
  143.     cmPS2CRD3Tag                = 'psd3';
  144.     cmPS2CSATag                    = 'ps2s';
  145.     cmPS2RenderingIntentTag        = 'ps2i';
  146.     cmRedColorantTag            = 'rXYZ';
  147.     cmRedTRCTag                    = 'rTRC';
  148.     cmScreeningDescTag            = 'scrd';
  149.     cmScreeningTag                = 'scrn';
  150.     cmTechnologyTag                = 'tech';
  151.     cmUcrBgTag                    = 'bfd ';
  152.     cmViewingConditionsDescTag    = 'vued';
  153.     cmViewingConditionsTag        = 'view';
  154.  
  155. { custom tags }
  156.     cmPS2CRDVMSizeTag            = 'psvm';
  157.  
  158. { technology tag descriptions }
  159.     cmTechnologyFilmScanner        = 'fscn';
  160.     cmTechnologyReflectiveScanner = 'rscn';
  161.     cmTechnologyInkJetPrinter    = 'ijet';
  162.     cmTechnologyThermalWaxPrinter = 'twax';
  163.     cmTechnologyElectrophotographicPrinter = 'epho';
  164.     cmTechnologyElectrostaticPrinter = 'esta';
  165.     cmTechnologyDyeSublimationPrinter = 'dsub';
  166.     cmTechnologyPhotographicPaperPrinter = 'rpho';
  167.     cmTechnologyFilmWriter        = 'fprn';
  168.     cmTechnologyVideoMonitor    = 'vidm';
  169.     cmTechnologyVideoCamera        = 'vidc';
  170.     cmTechnologyProjectionTelevision = 'pjtv';
  171.     cmTechnologyCRTDisplay        = 'CRT ';
  172.     cmTechnologyPMDisplay        = 'PMD ';
  173.     cmTechnologyAMDisplay        = 'AMD ';
  174.     cmTechnologyPhotoCD            = 'KPCD';
  175.     cmTechnologyPhotoImageSetter = 'imgs';
  176.     cmTechnologyGravure            = 'grav';
  177.     cmTechnologyOffsetLithography = 'offs';
  178.     cmTechnologySilkscreen        = 'silk';
  179.     cmTechnologyFlexography        = 'flex';
  180.  
  181. { type signatures }
  182.     cmSigCurveType                = 'curv';
  183.     cmSigDataType                = 'data';
  184.     cmSigDateTimeType            = 'dtim';
  185.     cmSigLut16Type                = 'mft2';
  186.     cmSigLut8Type                = 'mft1';
  187.     cmSigMeasurementType        = 'meas';
  188.     cmSigNamedColorType            = 'ncol';
  189.     cmSigNamedColor2Type        = 'ncl2';
  190.     cmSigProfileDescriptionType    = 'desc';
  191.     cmSigScreeningType            = 'scrn';
  192.     cmSigS15Fixed16Type            = 'sf32';
  193.     cmSigSignatureType            = 'sig ';
  194.     cmSigTextType                = 'text';
  195.     cmSigU16Fixed16Type            = 'uf32';
  196.     cmSigU1Fixed15Type            = 'uf16';
  197.     cmSigUInt32Type                = 'ui32';
  198.     cmSigUInt64Type                = 'ui64';
  199.     cmSigUInt8Type                = 'ui08';
  200.     cmSigViewingConditionsType    = 'view';
  201.     cmSigXYZType                = 'XYZ ';
  202.  
  203. { Measurement type encodings }
  204. { Measurement Flare }
  205.     cmFlare0                    = $00000000;
  206.     cmFlare100                    = $00000001;
  207.  
  208. { Measurement Geometry    }
  209.     cmGeometryUnknown            = $00000000;
  210.     cmGeometry045or450            = $00000001;
  211.     cmGeometry0dord0            = $00000002;
  212.  
  213. { Standard Observer    }
  214.     cmStdobsUnknown                = $00000000;
  215.     cmStdobs1931TwoDegrees        = $00000001;
  216.     cmStdobs1964TenDegrees        = $00000002;
  217.  
  218. { Standard Illuminant }
  219.     cmIlluminantUnknown            = $00000000;
  220.     cmIlluminantD50                = $00000001;
  221.     cmIlluminantD65                = $00000002;
  222.     cmIlluminantD93                = $00000003;
  223.     cmIlluminantF2                = $00000004;
  224.     cmIlluminantD55                = $00000005;
  225.     cmIlluminantA                = $00000006;
  226.     cmIlluminantEquiPower        = $00000007;
  227.     cmIlluminantF8                = $00000008;
  228.  
  229. { Spot Function Value }
  230.     cmSpotFunctionUnknown        = 0;
  231.     cmSpotFunctionDefault        = 1;
  232.     cmSpotFunctionRound            = 2;
  233.     cmSpotFunctionDiamond        = 3;
  234.     cmSpotFunctionEllipse        = 4;
  235.     cmSpotFunctionLine            = 5;
  236.     cmSpotFunctionSquare        = 6;
  237.     cmSpotFunctionCross            = 7;
  238.  
  239. { Color Space Signatures }
  240.     cmXYZData                    = 'XYZ ';
  241.     cmLabData                    = 'Lab ';
  242.     cmLuvData                    = 'Luv ';
  243.     cmYxyData                    = 'Yxy ';
  244.     cmRGBData                    = 'RGB ';
  245.     cmGrayData                    = 'GRAY';
  246.     cmHSVData                    = 'HSV ';
  247.     cmHLSData                    = 'HLS ';
  248.     cmCMYKData                    = 'CMYK';
  249.     cmCMYData                    = 'CMY ';
  250.     cmMCH5Data                    = 'MCH5';
  251.     cmMCH6Data                    = 'MCH6';
  252.     cmMCH7Data                    = 'MCH7';
  253.     cmMCH8Data                    = 'MCH8';
  254.  
  255. { profileClass enumerations }
  256.     cmInputClass                = 'scnr';
  257.     cmDisplayClass                = 'mntr';
  258.     cmOutputClass                = 'prtr';
  259.     cmLinkClass                    = 'link';
  260.     cmAbstractClass                = 'abst';
  261.     cmColorSpaceClass            = 'spac';
  262.     cmNamedColorClass            = 'nmcl';
  263.  
  264. { platform enumerations }
  265.     cmMacintosh                    = 'APPL';
  266.     cmMicrosoft                    = 'MSFT';
  267.     cmSolaris                    = 'SUNW';
  268.     cmSiliconGraphics            = 'SGI ';
  269.     cmTaligent                    = 'TGNT';
  270.  
  271. { ColorSync 1.0 elements }
  272.     cmCS1ChromTag                = 'chrm';
  273.     cmCS1TRCTag                    = 'trc ';
  274.     cmCS1NameTag                = 'name';
  275.     cmCS1CustTag                = 'cust';
  276.  
  277. { General element data types }
  278.  
  279. TYPE
  280.     CMDateTimePtr = ^CMDateTime;
  281.     CMDateTime = RECORD
  282.         year:                    INTEGER;
  283.         month:                    INTEGER;
  284.         dayOfTheMonth:            INTEGER;
  285.         hours:                    INTEGER;
  286.         minutes:                INTEGER;
  287.         seconds:                INTEGER;
  288.     END;
  289.  
  290.     CMFixedXYZColorPtr = ^CMFixedXYZColor;
  291.     CMFixedXYZColor = RECORD
  292.         X:                        Fixed;
  293.         Y:                        Fixed;
  294.         Z:                        Fixed;
  295.     END;
  296.  
  297.     CMXYZComponent                        = INTEGER;
  298.     CMXYZColorPtr = ^CMXYZColor;
  299.     CMXYZColor = RECORD
  300.         X:                        CMXYZComponent;
  301.         Y:                        CMXYZComponent;
  302.         Z:                        CMXYZComponent;
  303.     END;
  304.  
  305.     CM2HeaderPtr = ^CM2Header;
  306.     CM2Header = RECORD
  307.         size:                    LONGINT;                                {  This is the total size of the Profile  }
  308.         CMMType:                OSType;                                    {  CMM signature,  Registered with CS2 consortium   }
  309.         profileVersion:            LONGINT;                                {  Version of CMProfile format  }
  310.         profileClass:            OSType;                                    {  input, display, output, devicelink, abstract, or color conversion profile type  }
  311.         dataColorSpace:            OSType;                                    {  color space of data  }
  312.         profileConnectionSpace:    OSType;                                    {  profile connection color space  }
  313.         dateTime:                CMDateTime;                                {  date and time of profile creation  }
  314.         CS2profileSignature:    OSType;                                    {  'acsp' constant ColorSync 2.0 file ID  }
  315.         platform:                OSType;                                    {  primary profile platform, Registered with CS2 consortium  }
  316.         flags:                    LONGINT;                                {  profile flags  }
  317.         deviceManufacturer:        OSType;                                    {  Registered with ICC consortium  }
  318.         deviceModel:            LONGINT;                                {  Registered with ICC consortium  }
  319.         deviceAttributes:        ARRAY [0..1] OF LONGINT;                {  Attributes like paper type  }
  320.         renderingIntent:        LONGINT;                                {  preferred rendering intent of tagged object  }
  321.         white:                    CMFixedXYZColor;                        {  profile illuminant  }
  322.         creator:                OSType;                                    {  profile creator  }
  323.         reserved:                PACKED ARRAY [0..43] OF CHAR;            {  reserved for future use  }
  324.     END;
  325.  
  326.     CMTagRecordPtr = ^CMTagRecord;
  327.     CMTagRecord = RECORD
  328.         tag:                    OSType;                                    {  Registered with CS2 consortium  }
  329.         elementOffset:            LONGINT;                                {  Relative to start of CMProfile  }
  330.         elementSize:            LONGINT;
  331.     END;
  332.  
  333.     CMTagElemTablePtr = ^CMTagElemTable;
  334.     CMTagElemTable = RECORD
  335.         count:                    LONGINT;
  336.         tagList:                ARRAY [0..0] OF CMTagRecord;            {  Variable size  }
  337.     END;
  338.  
  339. { External 0x02002001 CMProfile }
  340.     CM2ProfilePtr = ^CM2Profile;
  341.     CM2Profile = RECORD
  342.         header:                    CM2Header;
  343.         tagTable:                CMTagElemTable;
  344.         elemData:                SInt8;                                    {  Tagged element storage. Variable size  }
  345.     END;
  346.  
  347.     CM2ProfileHandle                    = ^CM2ProfilePtr;
  348. { Tag Type Definitions }
  349.     CMCurveTypePtr = ^CMCurveType;
  350.     CMCurveType = RECORD
  351.         typeDescriptor:            OSType;                                    {  'curv'  }
  352.         reserved:                LONGINT;                                {  fill with 0x00  }
  353.         countValue:                LONGINT;                                {  number of entries in table that follows  }
  354.         data:                    ARRAY [0..0] OF INTEGER;                {  Tagged element storage. Variable size  }
  355.     END;
  356.  
  357.     CMDataTypePtr = ^CMDataType;
  358.     CMDataType = RECORD
  359.         typeDescriptor:            OSType;                                    {  'data'  }
  360.         reserved:                LONGINT;                                {  fill with 0x00  }
  361.         dataFlag:                LONGINT;                                {  0 = ASCII, 1 = binary  }
  362.         data:                    SInt8;                                    {  Tagged element storage. Variable size  }
  363.     END;
  364.  
  365.     CMDateTimeTypePtr = ^CMDateTimeType;
  366.     CMDateTimeType = RECORD
  367.         typeDescriptor:            OSType;                                    {  'dtim'  }
  368.         reserved:                LONGINT;
  369.         dateTime:                CMDateTime;
  370.     END;
  371.  
  372.     CMLut16TypePtr = ^CMLut16Type;
  373.     CMLut16Type = RECORD
  374.         typeDescriptor:            OSType;                                    {  'mft2'  }
  375.         reserved:                LONGINT;                                {  fill with 0x00  }
  376.         inputChannels:            SInt8;                                    {  Number of input channels  }
  377.         outputChannels:            SInt8;                                    {  Number of output channels  }
  378.         gridPoints:                SInt8;                                    {  Number of clutTable grid points  }
  379.         reserved2:                SInt8;                                    {  fill with 0x00  }
  380.         matrix:                    ARRAY [0..2,0..2] OF Fixed;                {   }
  381.         inputTableEntries:        INTEGER;                                {   }
  382.         outputTableEntries:        INTEGER;                                {   }
  383.         inputTable:                ARRAY [0..0] OF INTEGER;                {  Variable size  }
  384.         CLUT:                    ARRAY [0..0] OF INTEGER;                {  Variable size  }
  385.         outputTable:            ARRAY [0..0] OF INTEGER;                {  Variable size  }
  386.     END;
  387.  
  388.     CMLut8TypePtr = ^CMLut8Type;
  389.     CMLut8Type = RECORD
  390.         typeDescriptor:            OSType;                                    {  'mft1'  }
  391.         reserved:                LONGINT;                                {  fill with 0x00  }
  392.         inputChannels:            SInt8;                                    {   }
  393.         outputChannels:            SInt8;                                    {   }
  394.         gridPoints:                SInt8;                                    {   }
  395.         reserved2:                SInt8;                                    {  fill with 0x00  }
  396.         matrix:                    ARRAY [0..2,0..2] OF Fixed;                {   }
  397.         inputTable:                PACKED ARRAY [0..255] OF UInt8;            {  fixed size of 256  }
  398.         CLUT:                    PACKED ARRAY [0..1] OF UInt8;            {  Variable size  }
  399.         outputTable:            PACKED ARRAY [0..255] OF UInt8;            {  fixed size of 256  }
  400.     END;
  401.  
  402.     CMMeasurementTypePtr = ^CMMeasurementType;
  403.     CMMeasurementType = RECORD
  404.         typeDescriptor:            OSType;                                    {  'meas'  }
  405.         reserved:                LONGINT;                                {  fill with 0x00  }
  406.         standardObserver:        LONGINT;                                {  0 : unknown, 1 : CIE 1931, 2 : CIE 1964  }
  407.         backingXYZ:                CMFixedXYZColor;                        {  absolute XYZ values of backing  }
  408.         geometry:                LONGINT;                                {  0 : unknown, 1 : 0/45 or 45/0, 2 :0/d or d/0  }
  409.         flare:                    LONGINT;                                {  0 : 0%, 1 : 100% flare  }
  410.         illuminant:                LONGINT;                                {  standard illuminant  }
  411.     END;
  412.  
  413.     CMNamedColorTypePtr = ^CMNamedColorType;
  414.     CMNamedColorType = RECORD
  415.         typeDescriptor:            OSType;                                    {  'ncol'  }
  416.         reserved:                LONGINT;                                {  fill with 0x00  }
  417.         vendorFlag:                LONGINT;                                {   }
  418.         count:                    LONGINT;                                {  count of named colors in array that follows  }
  419.         prefixName:                SInt8;                                    {  Variable size, max = 32, to access fields after this one, have to count bytes  }
  420.         suffixName:                SInt8;                                    {  Variable size, max = 32  }
  421.         data:                    SInt8;                                    {  varaible size data as explained below  }
  422.     END;
  423.  
  424. {    
  425.     A variable size array of structs appears as the last block of data
  426.     in the above struct, CMNamedColorType.  The data structure
  427.     is as follows: (example in C)
  428.     
  429.      struct (                                             
  430.             unsigned char    rootName[1];                 * Variable size, max = 32 
  431.             unsigned char    colorCoords[1];                 * Variable size  
  432.      ) colorName[1];                                     * Variable size  
  433. }
  434.     CMNamedColor2TypePtr = ^CMNamedColor2Type;
  435.     CMNamedColor2Type = RECORD
  436.         typeDescriptor:            OSType;                                    {  'ncl2'  }
  437.         reserved:                LONGINT;                                {  fill with 0x00  }
  438.         vendorFlag:                LONGINT;                                {  lower 16 bits reserved for ICC use  }
  439.         count:                    LONGINT;                                {  count of named colors in array that follows  }
  440.         deviceChannelCount:        LONGINT;                                {  number of device channels, 0 indicates no device value available  }
  441.         prefixName:                PACKED ARRAY [0..31] OF UInt8;            {  32 byte field.  7 bit ASCII null terminated  }
  442.         suffixName:                PACKED ARRAY [0..31] OF UInt8;            {  32 byte field.  7 bit ASCII null terminated  }
  443.         data:                    SInt8;                                    {  varaible size data as explained below  }
  444.     END;
  445.  
  446. {    
  447.     A variable size array of structs appears as the last block of data
  448.     in the above struct, CMNamedColor2Type.  The data structure
  449.     is as follows: (example in C)
  450.     
  451.      struct (                                             
  452.             unsigned char    rootName[1];                 * 32 byte field.  7 bit ASCII null terminated
  453.             unsigned char    PCSColorCoords[1];             * Variable size  
  454.             unsigned char    DeviceColorCoords[1];         * Variable size  
  455.      ) colorName2[1];                                     * Variable size  
  456. }
  457.  
  458.     CMTextDescriptionTypePtr = ^CMTextDescriptionType;
  459.     CMTextDescriptionType = PACKED RECORD
  460.         typeDescriptor:            OSType;                                    {  'desc'  }
  461.         reserved:                LONGINT;                                {  fill with 0x00  }
  462.         ASCIICount:                LONGINT;                                {  the count of "bytes"  }
  463.         ASCIIName:                PACKED ARRAY [0..1] OF UInt8;            {  Variable size, to access fields after this one, have to count bytes  }
  464.         UniCodeCode:            LONGINT;
  465.         UniCodeCount:            LONGINT;                                {  the count of characters, each character has two bytes  }
  466.         UniCodeName:            PACKED ARRAY [0..1] OF UInt8;            {  Variable size  }
  467.         ScriptCodeCode:            INTEGER;
  468.         ScriptCodeCount:        UInt8;                                    {  the count of "bytes"  }
  469.         ScriptCodeName:            PACKED ARRAY [0..1] OF UInt8;            {  Variable size  }
  470.     END;
  471.  
  472.     CMTextTypePtr = ^CMTextType;
  473.     CMTextType = RECORD
  474.         typeDescriptor:            OSType;                                    {  'text'  }
  475.         reserved:                LONGINT;                                {  fill with 0x00  }
  476.         text:                    SInt8;                                    {  count of text is obtained from tag size element  }
  477.     END;
  478.  
  479.     CMScreeningTypePtr = ^CMScreeningType;
  480.     CMScreeningType = RECORD
  481.         typeDescriptor:            OSType;                                    {  'scrn'  }
  482.         reserved:                LONGINT;                                {  fill with 0x00  }
  483.         screeningFlag:            LONGINT;                                {  bit 0 : use printer default screens, bit 1 : inch/cm  }
  484.         channelCount:            LONGINT;
  485.         data:                    SInt8;                                    {  varaible size data as explained below  }
  486.     END;
  487.  
  488. {
  489.     A variable size array of structs appears as the last block of data
  490.     in the above struct, CMScreeningType.  The data structure
  491.     is as follows: (example in C)
  492.     
  493.     struct (
  494.         Fixed            frequency;
  495.         Fixed            angle;
  496.         unsigned long    sportFunction;
  497.      )    channelScreening[1];                             * Variable size 
  498. }
  499.     CMSignatureTypePtr = ^CMSignatureType;
  500.     CMSignatureType = RECORD
  501.         typeDescriptor:            OSType;                                    {  'sig '  }
  502.         reserved:                LONGINT;                                {  fill with 0x00  }
  503.         signature:                OSType;
  504.     END;
  505.  
  506.     CMS15Fixed16ArrayTypePtr = ^CMS15Fixed16ArrayType;
  507.     CMS15Fixed16ArrayType = RECORD
  508.         typeDescriptor:            OSType;                                    {  'sf32'  }
  509.         reserved:                LONGINT;                                {  fill with 0x00  }
  510.         value:                    ARRAY [0..0] OF Fixed;                    {  Variable size  }
  511.     END;
  512.  
  513.     CMU16Fixed16ArrayTypePtr = ^CMU16Fixed16ArrayType;
  514.     CMU16Fixed16ArrayType = RECORD
  515.         typeDescriptor:            OSType;                                    {  'uf32'  }
  516.         reserved:                LONGINT;                                {  fill with 0x00  }
  517.         value:                    ARRAY [0..0] OF LONGINT;                {  Variable size  }
  518.     END;
  519.  
  520.     CMUInt16ArrayTypePtr = ^CMUInt16ArrayType;
  521.     CMUInt16ArrayType = RECORD
  522.         typeDescriptor:            OSType;                                    {  'ui16'  }
  523.         reserved:                LONGINT;                                {  fill with 0x00  }
  524.         value:                    ARRAY [0..0] OF INTEGER;                {  Variable size  }
  525.     END;
  526.  
  527.     CMUInt32ArrayTypePtr = ^CMUInt32ArrayType;
  528.     CMUInt32ArrayType = RECORD
  529.         typeDescriptor:            OSType;                                    {  'ui32'  }
  530.         reserved:                LONGINT;                                {  fill with 0x00  }
  531.         value:                    ARRAY [0..0] OF LONGINT;                {  Variable size  }
  532.     END;
  533.  
  534.     CMUInt64ArrayTypePtr = ^CMUInt64ArrayType;
  535.     CMUInt64ArrayType = RECORD
  536.         typeDescriptor:            OSType;                                    {  'ui64'  }
  537.         reserved:                LONGINT;                                {  fill with 0x00  }
  538.         value:                    ARRAY [0..0] OF LONGINT;                {  Variable size (x2)  }
  539.     END;
  540.  
  541.     CMUInt8ArrayTypePtr = ^CMUInt8ArrayType;
  542.     CMUInt8ArrayType = RECORD
  543.         typeDescriptor:            OSType;                                    {  'ui08'  }
  544.         reserved:                LONGINT;                                {  fill with 0x00  }
  545.         value:                    SInt8;                                    {  Variable size  }
  546.     END;
  547.  
  548.     CMViewingConditionsTypePtr = ^CMViewingConditionsType;
  549.     CMViewingConditionsType = RECORD
  550.         typeDescriptor:            OSType;                                    {  'view'  }
  551.         reserved:                LONGINT;                                {  fill with 0x00  }
  552.         illuminant:                CMFixedXYZColor;                        {  absolute XYZs of illuminant  in cd/m^2  }
  553.         surround:                CMFixedXYZColor;                        {  absolute XYZs of surround in cd/m^2  }
  554.         stdIlluminant:            LONGINT;                                {  see definitions of std illuminants  }
  555.     END;
  556.  
  557.     CMXYZTypePtr = ^CMXYZType;
  558.     CMXYZType = RECORD
  559.         typeDescriptor:            OSType;                                    {  'XYZ '  }
  560.         reserved:                LONGINT;                                {  fill with 0x00  }
  561.         XYZ:                    ARRAY [0..0] OF CMFixedXYZColor;        {  variable size XYZ tristimulus values  }
  562.     END;
  563.  
  564. { Profile sequence description type }
  565.     CMProfileSequenceDescTypePtr = ^CMProfileSequenceDescType;
  566.     CMProfileSequenceDescType = RECORD
  567.         typeDescriptor:            OSType;                                    {  'pseq '  }
  568.         reserved:                LONGINT;                                {  fill with 0x00  }
  569.         count:                    LONGINT;                                {  Number of descriptions  }
  570.         data:                    SInt8;                                    {  varaible size data as explained below  }
  571.     END;
  572.  
  573. {
  574.     A variable size array of structs appears as the last block of data
  575.     in the above struct, CMProfileSequenceDescType.  The data structure
  576.     is as follows: (example in C)
  577.     
  578.      struct (                                             
  579.             OSType            deviceMfg;                     * Device Manufacturer 
  580.             OSType            deviceModel;                 * Decvice Model 
  581.             unsigned long    attributes[2];                 * Device attributes 
  582.             OSType            technology;                     * Technology signature 
  583.             unsigned long    mfgDescASCIICount;             * the count of "bytes" 
  584.             unsigned char    mfgDescASCIIName[2];         * Variable size 
  585.             unsigned long    mfgDescUniCodeCode;             
  586.             unsigned long    mfgDescUniCodeCount;         * the count of characters, each character has two bytes 
  587.             unsigned char    mfgDescUniCodeName[2];         * Variable size 
  588.             unsigned long    mfgDescScriptCodeCode;         
  589.             unsigned long    mfgDescScriptCodeCount;         * the count of "bytes" 
  590.             unsigned char    mfgDescScriptCodeName[2];     * Variable size 
  591.             unsigned long    modelDescASCIICount;         * the count of "bytes" 
  592.             unsigned char    modelDescASCIIName[2];         * Variable size 
  593.             unsigned long    modelDescUniCodeCode;         
  594.             unsigned long    modelDescUniCodeCount;         * the count of characters, each character has two bytes 
  595.             unsigned char    modelDescUniCodeName[2];     * Variable size 
  596.             short            modelDescScriptCodeCode;     
  597.             unsigned char    modelDescScriptCodeCount;     * the count of "bytes" 
  598.             SInt8            filler;                         * For proper alignment across languages 
  599.             unsigned char    modelDescScriptCodeName[2];     * Variable size 
  600.      )    profileDescription[1];                         
  601. }
  602.  
  603. { Under color removal, black generation type }
  604.     CMUcrBgTypePtr = ^CMUcrBgType;
  605.     CMUcrBgType = RECORD
  606.         typeDescriptor:            OSType;                                    {  'bfd  '  }
  607.         reserved:                LONGINT;                                {  fill with 0x00  }
  608.         ucrCount:                LONGINT;                                {  Number of UCR entries  }
  609.         ucrValues:                ARRAY [0..0] OF INTEGER;                {  variable size  }
  610.         bgCount:                LONGINT;                                {  Number of BG entries  }
  611.         bgValues:                ARRAY [0..0] OF INTEGER;                {  variable size  }
  612.         ucrbgASCII:                SInt8;                                    {  null terminated ASCII string  }
  613.     END;
  614.  
  615.     CMIntentCRDVMSizePtr = ^CMIntentCRDVMSize;
  616.     CMIntentCRDVMSize = RECORD
  617.         renderingIntent:        LONGINT;                                {  rendering intent  }
  618.         VMSize:                    LONGINT;                                {  VM size taken up by the CRD  }
  619.     END;
  620.  
  621.     CMPS2CRDVMSizeTypePtr = ^CMPS2CRDVMSizeType;
  622.     CMPS2CRDVMSizeType = RECORD
  623.         typeDescriptor:            OSType;                                    {  'psvm'  }
  624.         reserved:                LONGINT;                                {  fill with 0x00  }
  625.         count:                    LONGINT;                                {  number of intent entries  }
  626.         intentCRD:                ARRAY [0..0] OF CMIntentCRDVMSize;        {  variable size  }
  627.     END;
  628.  
  629. {**********************************************************************}
  630. {************** ColorSync 1.0 profile specification *******************}
  631. {**********************************************************************}
  632.  
  633. CONST
  634.     cmGrayResponse                = 0;
  635.     cmRedResponse                = 1;
  636.     cmGreenResponse                = 2;
  637.     cmBlueResponse                = 3;
  638.     cmCyanResponse                = 4;
  639.     cmMagentaResponse            = 5;
  640.     cmYellowResponse            = 6;
  641.     cmUcrResponse                = 7;
  642.     cmBgResponse                = 8;
  643.     cmOnePlusLastResponse        = 9;
  644.  
  645.  
  646. { Device types }
  647.     cmMonitorDevice                = 'mntr';
  648.     cmScannerDevice                = 'scnr';
  649.     cmPrinterDevice                = 'prtr';
  650.  
  651.  
  652.  
  653. TYPE
  654.     CMIStringPtr = ^CMIString;
  655.     CMIString = RECORD
  656.         theScript:                ScriptCode;
  657.         theString:                Str63;
  658.     END;
  659.  
  660. { Profile options }
  661.  
  662. CONST
  663.     cmPerceptualMatch            = $0000;                        {  Default. For photographic images  }
  664.     cmColorimetricMatch            = $0001;                        {  Exact matching when possible  }
  665.     cmSaturationMatch            = $0002;                        {  For solid colors  }
  666.  
  667. { Profile flags }
  668.     cmNativeMatchingPreferred    = $00000001;                    {  Default to native not preferred  }
  669.     cmTurnOffCache                = $00000002;                    {  Default to turn on CMM cache  }
  670.  
  671.  
  672. TYPE
  673.     CMMatchOption                        = LONGINT;
  674.     CMMatchFlag                            = LONGINT;
  675.     CMHeaderPtr = ^CMHeader;
  676.     CMHeader = RECORD
  677.         size:                    LONGINT;
  678.         CMMType:                OSType;
  679.         applProfileVersion:        LONGINT;
  680.         dataType:                OSType;
  681.         deviceType:                OSType;
  682.         deviceManufacturer:        OSType;
  683.         deviceModel:            LONGINT;
  684.         deviceAttributes:        ARRAY [0..1] OF LONGINT;
  685.         profileNameOffset:        LONGINT;
  686.         customDataOffset:        LONGINT;
  687.         flags:                    CMMatchFlag;
  688.         options:                CMMatchOption;
  689.         white:                    CMXYZColor;
  690.         black:                    CMXYZColor;
  691.     END;
  692.  
  693.     CMProfileChromaticitiesPtr = ^CMProfileChromaticities;
  694.     CMProfileChromaticities = RECORD
  695.         red:                    CMXYZColor;
  696.         green:                    CMXYZColor;
  697.         blue:                    CMXYZColor;
  698.         cyan:                    CMXYZColor;
  699.         magenta:                CMXYZColor;
  700.         yellow:                    CMXYZColor;
  701.     END;
  702.  
  703.     CMProfileResponsePtr = ^CMProfileResponse;
  704.     CMProfileResponse = RECORD
  705.         counts:                    ARRAY [0..8] OF INTEGER;
  706.         data:                    ARRAY [0..0] OF INTEGER;                {  Variable size  }
  707.     END;
  708.  
  709.     CMProfilePtr = ^CMProfile;
  710.     CMProfile = RECORD
  711.         header:                    CMHeader;
  712.         profile:                CMProfileChromaticities;
  713.         response:                CMProfileResponse;
  714.         profileName:            CMIString;
  715.         customData:                SInt8;                                    {  Variable size  }
  716.     END;
  717.  
  718.     CMProfileHandle                        = ^CMProfilePtr;
  719. {$IFC OLDROUTINENAMES }
  720.  
  721. CONST
  722.     kCMApplProfileVersion        = $00000100;
  723.  
  724.     grayResponse                = 0;
  725.     redResponse                    = 1;
  726.     greenResponse                = 2;
  727.     blueResponse                = 3;
  728.     cyanResponse                = 4;
  729.     magentaResponse                = 5;
  730.     yellowResponse                = 6;
  731.     ucrResponse                    = 7;
  732.     bgResponse                    = 8;
  733.     onePlusLastResponse            = 9;
  734.  
  735.     rgbData                        = 'RGB ';
  736.     cmykData                    = 'CMYK';
  737.     grayData                    = 'GRAY';
  738.     xyzData                        = 'XYZ ';
  739.  
  740.     monitorDevice                = 'mntr';
  741.     scannerDevice                = 'scnr';
  742.     printerDevice                = 'prtr';
  743.  
  744.  
  745. TYPE
  746.     XYZComponent                        = INTEGER;
  747.     XYZColor                            = CMXYZColor;
  748.     XYZColorPtr                         = ^XYZColor;
  749.     CMResponseData                        = INTEGER;
  750.     IString                                = CMIString;
  751.     IStringPtr                             = ^IString;
  752.     CMResponseColor                        = LONGINT;
  753.     responseColor                        = CMResponseColor;
  754.  
  755. {$ENDC}  {OLDROUTINENAMES}
  756.  
  757.  
  758. {$ALIGN RESET}
  759. {$POP}
  760.  
  761. {$SETC UsingIncludes := CMICCProfileIncludes}
  762.  
  763. {$ENDC} {__CMICCPROFILE__}
  764.  
  765. {$IFC NOT UsingIncludes}
  766.  END.
  767. {$ENDC}
  768.